package com.yunji.cabinet.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yunji.cabinet.domain.CabinetTemplateCellDO;
import com.yunji.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import java.util.List;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.cabinet.dto
 * @Title: TemplateDTO
 * @Description: TODO:
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-06-17 19:57:47      V1.0        HuaAo       新建类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TemplateDTO {

    @ApiModelProperty(value = "模板ID")
    @TableId(type = IdType.AUTO)
    private Long templateId;

    @ApiModelProperty(value = "所属ID")
    private Long belongId;

    @Excel(name = "模板名称")
    @ApiModelProperty(value = "模板名称", required = true)
    @Length(message = "模板名称不能超过{max}个字符", max = 10)
    private String templateName;

    @Excel(name = "用户类型")
    @ApiModelProperty(value = "用户类型")
    private String userType;

    @Excel(name = "用户ID")
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @Excel(name = "代理ID")
    @ApiModelProperty(value = "代理ID")
    private Long agentId;

    @Excel(name = "网点id")
    @ApiModelProperty(value = "网点id")
    private Long siteId;

    @Excel(name = "货柜类型code")
    @ApiModelProperty(value = "货柜类型code", required = true)
    private String typeCode;

    @Excel(name = "货柜类型名称")
    @ApiModelProperty(value = "货柜类型名称")
    private String typeCodeName;

    @Excel(name = "货柜格子数量")
    @ApiModelProperty("货柜格子数量")
    @Max(message = "格子数不能超过{value}", value = 99)
    private Integer nums;

    @Excel(name = "模板状态")
    @ApiModelProperty("模板状态")
    private Integer status;

    @Excel(name = "模板商品信息")
    @ApiModelProperty(value = "模板商品信息", required = true)
    @TableField(exist = false)
    private List<CabinetTemplateCellDO> list;

}